package com.meng.cloud.service;

import com.meng.cloud.service.hystrix.HelloRemoteHystrix;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * Hello 控制层的远程调用
 *
 * @author MENG
 * @version 2018/1/3
 * @see
 */

//name 服务提供者的spring.application.name  fallback 熔断器回调 当服务不可用 执行回调类
@FeignClient(name= "spring-cloud-producer",fallback = HelloRemoteHystrix.class)
public interface HelloRemote
{
    @RequestMapping("sayHello")
    String sayHello(@RequestParam("name") String name);

}
